<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改终端列表')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-devices-edit" th:object="${devices}">
            <input name="Id" th:field="*{Id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">设备号：</label>
                <div class="col-sm-8">
                    <input name="DeviceNum" th:field="*{DeviceNum}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">设备名称：</label>
                <div class="col-sm-8">
                    <input name="DeviceName" th:field="*{DeviceName}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">SIM卡码：</label>
                <div class="col-sm-8">
                    <input name="SimCode" th:field="*{SimCode}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">货道数量：</label>
                <div class="col-sm-8">
                    <input name="SensorCount" th:field="*{SensorCount}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">设备是否禁用 1启用 &2代理商禁用 &3 渠道商禁用 &4 超管禁用：</label>
                <div class="col-sm-8">
                    <input name="Disabled" th:field="*{Disabled}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">渠道商id：</label>
                <div class="col-sm-8">
                    <input name="DistributorId" th:field="*{DistributorId}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">代理商id：</label>
                <div class="col-sm-8">
                    <input name="AgentId" th:field="*{AgentId}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">添加时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="AddDatetime" th:value="${#dates.format(devices.AddDatetime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">过期时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="OverDatetime" th:value="${#dates.format(devices.OverDatetime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">服务费：</label>
                <div class="col-sm-8">
                    <input name="AnnualFee" th:field="*{AnnualFee}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">设备类型(1:自助售货机，2:充电桩，3:售纸机)：</label>
                <div class="col-sm-8">
                    <input name="DeviceTypeId" th:field="*{DeviceTypeId}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">是否删除 1/2 是/否：</label>
                <div class="col-sm-8">
                    <input name="IsDeleted" th:field="*{IsDeleted}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">补货员Id：</label>
                <div class="col-sm-8">
                    <input name="ReplenishmentClerksId" th:field="*{ReplenishmentClerksId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">合作伙伴Id：</label>
                <div class="col-sm-8">
                    <input name="PartnersId" th:field="*{PartnersId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">续费时间 单位 月：</label>
                <div class="col-sm-8">
                    <input name="RenewalTime" th:field="*{RenewalTime}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">设备是否在线 0否 1是：</label>
                <div class="col-sm-8">
                    <input name="IsOnline" th:field="*{IsOnline}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">网络是否正常 0否 1是：</label>
                <div class="col-sm-8">
                    <input name="HeartBeatState" th:field="*{HeartBeatState}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">null：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="LastHeartBeat" th:value="${#dates.format(devices.LastHeartBeat, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">购物车:0购买单个/1是多个/2是全部/：</label>
                <div class="col-sm-8">
                    <input name="ShoppingCar" th:field="*{ShoppingCar}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">是否开启信号检测1/2 是/否：</label>
                <div class="col-sm-8">
                    <input name="OpenSignalMonitor" th:field="*{OpenSignalMonitor}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">正在处理的订单号。当服务关闭时，如果设备空闲，此处为空字符串；如果设备正在交易，此处为对应订单号。服务开启后，首次查询此处，更新设备交易状态。：</label>
                <div class="col-sm-8">
                    <input name="HandOrdernum" th:field="*{HandOrdernum}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">是否交由服务代理查询交易状态 0否 1是：</label>
                <div class="col-sm-8">
                    <input name="AgentQueryTrade" th:field="*{AgentQueryTrade}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">是否开启自检：</label>
                <div class="col-sm-8">
                    <input name="IsSelf" th:field="*{IsSelf}" class="form-control" type="text" required>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "system/devices";
        $("#form-devices-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-devices-edit').serialize());
            }
        }

        $("input[name='AddDatetime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='OverDatetime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='LastHeartBeat']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>